using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using Voodoo.Sauce.Core;

public class CityBuilderCanvas : MonoBehaviour
{
	public Text CoinCount;

	public Text GemCount;

	public TextMeshProUGUI LevelCount;

	private void Update()
	{
		CoinCount.text = CityBuildingManager.Instance.Money.ToString();
		GemCount.text = CityBuildingManager.Instance.Gems.ToString();
		LevelCount.text = "Level " + (CityBuildingManager.Instance.CurrentLevel + 1);
	}

	public void OnBackClicked()
	{
		if ((bool)Object.FindObjectOfType<VoodooSauceBehaviour>())
		{
			SceneManager.LoadScene("GamePlay");
		}
		else
		{
			SceneManager.LoadScene("Preloader");
		}
	}
}
